/*
 * Copyrights of MYeBills. Do not copy or distribute without permissions.
 *
 * TODO 
 */
package com.mbbmap.app.dao;

import java.util.*;

import com.mbbmap.util.*;

/**
 * 
 * security access user
 */
public class LogonUserDao implements java.io.Serializable {
    
	private String loginId;
	private String name;
	private String agencyCode;
	private Date lastLogin;
	private String roleCode;
	private int noOfBadPwdAttempts;
	private String enabled;
	private String locked;
	private String resetPwd;
	private Date lastPwdChanged;
	private Date noAccessDate;
	private String createStatus;

	// SETTER
	public void setLoginId (String id) {
	    this.loginId = id;
	}
	
	public void setName (String userName) {
	    this.name = userName;
	}
	
	public void setAgencyCode (String code) {
	    this.agencyCode = code;
	}
	
	public void setLastLogin (Date lastLogin) {
	    this.lastLogin = lastLogin;
	}
	
	public void setRoleCode (String role) {
	    this.roleCode = role;
	}
	
	public void setNoOfBadPwdAttempts (int no) {
	    this.noOfBadPwdAttempts = no;
	}
	
	public void setEnabled (String enabled) {
	    this.enabled = enabled;
	}
	
	public void setLocked (String locked) {
	    this.locked = locked;
	}
	
	public void setResetPwd (String resetPwd) {
	    this.resetPwd = resetPwd;
	}

	public void setLastPwdChanged (Date date) {
	    this.lastPwdChanged = date;
	}
	
	public void setNoAccessDate (Date date) {
	    this.noAccessDate = date;
	}
	
	public void setCreateStatus (String status) {
	    this.createStatus = status;
	}
	
	// GETTER
	public String getLoginId () {
	    return nullToEmpty(loginId);
	}
	
	public String getName () {
	    return nullToEmpty(name);
	}

	public String getAgencyCode () {
	    return nullToEmpty(agencyCode);
	}
	
	public Date getLastLogin () {
	    return lastLogin;
	}
	
	public String getRoleCode () {
	    return nullToEmpty(roleCode);
	}
	
	public int getNoOfBadPwdAttempts () {
	    return noOfBadPwdAttempts;
	}
	
	public String getEnabled () {
	    return nullToEmpty(enabled);
	}
	
	public String getLocked () {
	    return nullToEmpty(locked);
	}
	
	public String getResetPwd () {
	    return nullToEmpty(resetPwd);
	}
	
	public Date getLastPwdChanged () {
	    return lastPwdChanged;
	}
	
	public Date getNoAccessDate () {
	    return noAccessDate;
	}
	
	public String getCreateStatus () {
	    return nullToEmpty(createStatus);
	}
	
	public String nullToEmpty (String inStr) {
	    if (inStr == null ) {
	    	return "";
	    } else 
	        return inStr.trim();
	    	
	}
}
